/**
 * 注册全局组件
 * 命名规则：所有组件名称开头字母大写，驼峰标识
 * 所注册的组件会加一个“xy-”前缀，与element-ui（“el-”开头）区分开
 */
import Page from './xyPage.vue'
import Search from './xySearch.vue'
import Table from './xyTable.vue'
import Noresult from './xyNoresult.vue'
import Region from './xyRegion.vue'

import Breadcrumb from './xyBreadcrumb.vue'

import Popover from './xyPopover.vue'
import HeaderInfo from './xyHeaderInfo.vue'
import Upload from './xyUpload.vue'
import InputNumber from './xyInputNumber.vue'
import InputFormat from './xyInputFormat.vue'
//import SelectImg from './xySelectImg.vue'
import Pagination from './xyPagination.vue'
import Select from './xySelect.vue'

const components = [
  Page,
  Search,
  Table,
  Region,
  Breadcrumb,
  Noresult,
  Popover,
  HeaderInfo,
  Upload,
  InputNumber,
  InputFormat,
  Pagination,
  Select,
]

export default {
  install(Vue, opts = {}) {
    components.map(component => {
      Vue.component('xy' + component.name, component)
    })
  }
}
